/**
 * @file FOC_conf.h
 * @brief configurations of FOC algorithm
 */

#ifndef FOC_LOOP_FOC_CONF_H
#define FOC_LOOP_FOC_CONF_H
#include "main.h"
//#include "FOC_PID.h"

typedef struct struct_FOC{
    float Ts;   //sample time second
    float Kv;   //kv 190
    uint8_t Pn; //Pole pairs 7
    float R;    //Resistance 10R Ω
    float voltageUsedForSensorAlign;  //used for align sensor
    float PowerVoltage;   //V
    float LimitVoltage;   //V
    float LimitCurrent;   //A
    float LimitVelocity;  //rad/s
  //  PID_DataType pid_velocity;
   // PID_DataType pid_position;

}struct_FOC_t;

struct_FOC_t st_FOC;

#define SENSOR_VALUE_RANGE  4095
//顺时针增加 CW ClockWise CCW CounterClockWise
#define SENSOR_DIRECTION  1

#endif //FOC_DRIVER_FOC_CONF_H
